﻿<%@ Page Title="" Language="C#" MasterPageFile="~/DeveloperSite.Master" AutoEventWireup="true" 
    CodeBehind="Delete.aspx.cs" Inherits="UNDP_Projects.CO.Delete" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <asp:EntityDataSource ID="SavedProjectsDataSource" runat="server" 
        ConnectionString="name=UNDPEntities" DefaultContainerName="UNDPEntities" 
        EnableDelete="True" EnableFlattening="False" EnableInsert="True" 
        EnableUpdate="True" EntitySetName="project_reports" 
        Include="year, report_period, project" 
        AutoGenerateWhereClause="true">
        <WhereParameters>
            <asp:Parameter DefaultValue="true" Name="saved" Type="Boolean" />
        </WhereParameters>
    </asp:EntityDataSource>

    <p>
    <asp:Label ID="Error" runat="server" Text="" Visible="false" CssClass="ErrorText"></asp:Label>
    <asp:Label ID="ContextLabel" runat="server" Text="Saved Projects Reports" CssClass="ContentHead"></asp:Label>
    </p><br />

    <asp:GridView ID="SavedProjectsGridView" runat="server" 
        AutoGenerateColumns="False" CssClass="NewGrid" 
        OnRowCommand="SavedProjectsGridView_RowCommand" ShowFooter="True" 
        DataSourceID="SavedProjectsDataSource" 
        DataKeyNames="project_id, year_id, report_period_id">
        <AlternatingRowStyle CssClass="NewGridAlt" />
        <FooterStyle CssClass="NewGridFooter" />
        <Columns>
            <asp:TemplateField HeaderText="Year">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("year.year1") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Report Period">
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Eval("report_period.report_period1") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Project">
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Eval("project.project1") %>'></asp:Label>
                </ItemTemplate>
             </asp:TemplateField>

             <asp:ButtonField ButtonType="Button" CommandName="view" Text="View" />
             <asp:ButtonField ButtonType="Button" CommandName="pdf" Text="PDF" />

        </Columns>
    </asp:GridView>
    <p>
        <asp:Label ID="ProjectLabel" runat="server" Text=""></asp:Label><br />
        <asp:Label ID="ReportPeriodLabel" runat="server" Text=""></asp:Label><br />
        <asp:Label ID="YearLabel" runat="server" Text=""></asp:Label>
    </p>
    
</asp:Content>
